package cn.jobstart.dao.impl;

import cn.jobstart.modelExt.TalentSubscriptionTaskExt;
import cn.jobstart.searchExt.TalentSubscriptionTaskSearchExt;
import cn.jobstart.pubInter.AbstractBaseDao;
import cn.jobstart.dao.mapperExt.TalentSubscriptionTaskMapperExt;
import cn.jobstart.dao.ITalentSubscriptionTaskDao;
import cn.jobstart.pubInter.IBaseMapper;

import org.springframework.stereotype.Repository;
import javax.annotation.Resource;

/**
 *    @author sunke
 *    @Date 2023-09-06 15:00:21
 *    @description TalentSubscriptionTaskDaoImpl      人才订阅任务
 */
@Repository(value = "talentSubscriptionTaskDao")
public class TalentSubscriptionTaskDaoImpl extends AbstractBaseDao<TalentSubscriptionTaskExt, TalentSubscriptionTaskSearchExt,String> implements ITalentSubscriptionTaskDao {

    @Resource
    private TalentSubscriptionTaskMapperExt talentSubscriptionTaskMapperExt;

    @Override
    public IBaseMapper<TalentSubscriptionTaskExt,  TalentSubscriptionTaskSearchExt,String> getMapper() {
        return talentSubscriptionTaskMapperExt;
    }


    /**
     * 更新简历更新数量
     *
     * @param taskId
     * @param count
     */
    @Override
    public void updateResumeUpdateCountByTaskIdAndCount(String taskId, int count) {

        talentSubscriptionTaskMapperExt.updateResumeUpdateCountByTaskIdAndCount(taskId,count);

    }

    /**
     * 更新爬取的总数量
     *
     * @param taskId
     * @param count
     */
    @Override
    public void updateResumeGraspCountByTaskIdAndCount(String taskId, int count) {
        talentSubscriptionTaskMapperExt.updateResumeGraspCountByTaskIdAndCount(taskId,count);
    }
}